package cn.hnevc.shanghaowang;

public class Market {

	private String marketName;
	private Product[] productArray;

	public String getMarketName() {
		return marketName;
	}

	public void setMarketName(String marketName) {
		this.marketName = marketName;
	}

	public Product[] getProductArray() {
		return productArray;
	}

	public void setProductArray(Product[] productArray) {
		this.productArray = productArray;
	}
	Product sell(String name){
		for(int i = 0;i<productArray.length;i++){
			if(productArray[i].getProName() == name){
				return productArray[i];
			}
		}
		return null;
	}
}
